@import "item-wrapper.less";
@import "item-header.less";

.item {
    .request > CODE {
        overflow: auto;
        display: block;
    }

    > .nocontents {
        padding: 10px 15px;
        display: none;
    }

    &:not(.diff-mode)[data-exists=no] {
        > .nocontents {
            display: block;
        }
        > .contents.content-left {
            display: none;
        }
    }
    > .contents {
        overflow-x: auto;

         > .title {
                display: none;
        }

        > .stack {
            border-top: 1px dotted #ddd;
            padding: 10px 15px 15px 15px;

            &:first-of-type {
                border-top: none;
            }
        }

        > .sample > DIV {
            display: none;
        }

        > .description {
            font-style: italic;
            margin-bottom: 0;
        }

        H5 {
            margin-top: 0;
            margin-bottom: 5px;
        }

        H6 {
            margin-top: 5px;
            margin-bottom: 5px;
        }

        .table {
            background-color: #FFF;

            THEAD {
                background-color: #F5F5F5;
            }

            TR.generic {
                background-color: #F5F5F5;
                font-style: italic;
            }
        }

        &.content-left  {
            display: block;
        }
        &.content-right {
            display: none;
        }
    }

    &:not(.diff-mode) > .contents {
        .diff_version:not(.diff_new) {
            display:none;
        }
    }

    &.diff-mode {
        .diff_version {
            &.diff_new {
                background-color: hsl(120, 100%, 93%) !important;
            }
            &.diff_del {
                background-color: hsl(0, 100%, 93%) !important;
            }
        }

        .diff_version.diff_none {
            display: none;
        }

        > .contents {
            > .sample {
                display: none;
            }
        }
    }

    &.diff-mode-side > .contents {
        > .title {
                display: block;
        }

        & {
            width: 50%;
            display: inline-block;

            > H5.title {
                text-align: center;
            }
        }

        > .stack.sample {
            display:none;
        }
        &.content-left .diff_new {
            visibility: hidden;
        }
        &.content-right .diff_del {
            visibility: hidden;
        }
    }

    &.diff-mode-inline > .contents {
        &.diff > H5.title {
            display:none;
        }

        &.content-left {
            display: block;
        }
        &.content-right {
            display: none;
        }
    }

    &.diff-mode-mini > .contents {
        .diff_version:not(.diff_new):not(.diff_del) {
            display:none;
        }
    }
}

@media (max-width: 1199px) {
    .item.diff-mode {
        .code TD:last-child {
            display: none;
        }
    }
}